#if !defined(GeneralizeHeader)
#define GeneralizeHeader

#include <string>
#include <vector>

#include "node.h"

class Generalizer {
public:
  pNode generalize (Node&);

  int nVariables () {
    return names.size ();
  }

  // Dump variable statuses. Makes sure the phrase to be generalized is still
  //  in memory
  std::string dump ();

  // Using vector is more efficient since we can construct and deconstruct as
  //  little members as possible. Use pointer to (final) nodes as all should
  //   point to the atom pool; more efficient than strings comparison
  std::vector<const Atom*> names;
  std::vector<pNode> unbindeds;
};

pNode generalize (Node&);

#endif
